package com.lantosec.hmrp.modules.system.vo;

import java.util.Date;

import com.lantosec.hmrp.modules.system.entity.SysCustomReport;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 自定义报表查询表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysCustomReport对象", description="自定义报表查询表")
public class SysCustomReportVO extends BaseVO<SysCustomReport> {
    private static final long serialVersionUID = 1L;


    public SysCustomReportVO(SysCustomReport entity){
        this.id = entity.getId();
        this.reportName = entity.getReportName();
        this.reportDesc = entity.getReportDesc();
        this.reportSource = entity.getReportSource();
        this.reportLayout = entity.getReportLayout();
        this.reportCondition = entity.getReportCondition();
        this.pagination = entity.getPagination();
        this.enable = entity.getEnable();
        this.export = entity.getExport();
        this.createTime = entity.getCreateTime();
    }

    @Override
    public SysCustomReport convertToEntity(){
        return new SysCustomReport(this);
    }


    @ApiModelProperty(value = "主键Id")
    private String id;

    @ApiModelProperty(value = "报表名称")
    private String reportName;

    @ApiModelProperty(value = "报表描述")
    private String reportDesc;

    @ApiModelProperty(value = "报表数据源")
    private String reportSource;

    @ApiModelProperty(value = "报表布局")
    private String reportLayout;

    @ApiModelProperty(value = "报表条件")
    private String reportCondition;

    @ApiModelProperty(value = "是否分页，0 不分页，1 分页")
    private Integer pagination;

    @ApiModelProperty(value = "是否启用，0 不启用，1 启用")
    private Integer enable;

    @ApiModelProperty(value = "是否导出，0 不导出，1 导出")
    private Integer export;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


}
